/**
 * 
 */
package me.security.base;

import static org.springframework.core.GenericTypeResolver.resolveTypeArguments;

import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.ConditionalGenericConverter;

/**
 * @author Lucas
 * 
 */
public class RepositoryDomainConverter implements ConditionalGenericConverter, ApplicationContextAware {

	private final ConversionService service;

	/**
	 * @param service
	 */
	public RepositoryDomainConverter(ConversionService service) {
		this.service = service;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.springframework.core.convert.converter.GenericConverter#
	 * getConvertibleTypes()
	 */
	public Set<ConvertiblePair> getConvertibleTypes() {
		return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.springframework.core.convert.converter.GenericConverter#convert(java
	 * .lang.Object, org.springframework.core.convert.TypeDescriptor,
	 * org.springframework.core.convert.TypeDescriptor)
	 */
	public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
		if(null == source){
			return null;
		}
		
        return null;
	}

	public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
		// TODO Auto-generated method stub
		return false;
	}

	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		// TODO Auto-generated method stub
		
	}

}
